package com.thinkTank.oa.entity;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import com.github.pagehelper.StringUtil;

/***
 * 操作日志记录表
 * @date 2018-08-21
 * @author dq
 */
public class Operationlog  implements Serializable{

	private static final long serialVersionUID = 1288309013853365315L;
		private Integer pid;
		/**
		 * 操作用户
		 */
	    private String username;
	    //用户操作
	    private String operation;
	    //执行时间
	    private Integer time;
	    //调用方法
	    private String method;
	    //参数
	    private String params;
	    //操作IP
	    private String ip;
	    //创建时间
	    private String createTime;
	    
	    /**
	     * 操作用户的Id
	     */
	    private String userId;
	    
	    //备注
	    private String  remark;
	    
	    //被记录的那条数据的主键
	    private String refPid;
	    
	    //仅用来查询
	    private String beginDate;
	    private String endDate;
	    private List<String> operaList;
	    
		public Operationlog() {}
		public Operationlog(String operation, String userId, String beginDate, String endDate) {
			this.operation = operation;
			this.userId = userId;
			this.beginDate = beginDate;
			this.endDate = endDate;
		}
		public Operationlog(String beginDate, String endDate, List<String> operaList) {
			this.beginDate = beginDate;
			this.endDate = endDate;
			this.operaList = operaList;
		}
		public String getRemark() {
			return remark;
		}
		public void setRemark(String remark) {
			this.remark = remark;
		}
		public String getUserId() {
			return userId;
		}
		public void setUserId(String userId) {
			this.userId = userId;
		}
		public Integer getPid() {
			return pid;
		}
		public void setPid(Integer pid) {
			this.pid = pid;
		}
		public String getUsername() {
			return username;
		}
		public void setUsername(String username) {
			this.username = username;
		}
		public String getOperation() {
			return operation;
		}
		public void setOperation(String operation) {
			this.operation = operation;
		}
		public Integer getTime() {
			return time;
		}
		public void setTime(Integer time) {
			this.time = time;
		}
		public String getMethod() {
			return method;
		}
		public void setMethod(String method) {
			this.method = method;
		}
		public String getParams() {
			return params;
		}
		public void setParams(String params) {
			this.params = params;
		}
		public String getIp() {
			return ip;
		}
		public void setIp(String ip) {
			this.ip = ip;
		}
		public String getCreateTime() {
			return createTime;
		}
		public void setCreateTime(String createTime) {
			this.createTime = createTime;
		}
		public String getRefPid() {
			return refPid;
		}
		public void setRefPid(String refPid) {
			this.refPid = refPid;
		}
		public String getBeginDate() {
			return beginDate;
		}
		public void setBeginDate(String beginDate) {
			this.beginDate = beginDate;
		}
		public String getEndDate() {
			return endDate;
		}
		public void setEndDate(String endDate) {
			this.endDate = endDate;
		}
		public List<String> getOperaList() {
			if (StringUtil.isNotEmpty(operation)) {
				operaList = operaList == null ? new ArrayList<>() : operaList;
				operaList.add(operation);
			}
			return operaList;
		}
		public void setOperaList(List<String> operaList) {
			this.operaList = operaList;
		}
	    
}
